home *** CD-ROM | disk | FTP | other *** search
- Path: seas.smu.edu!not-for-mail
- From: dbowman@post.smu.edu (Damon Bowman)
- Newsgroups: comp.lang.c++
- Subject: Q: how to handle currency?
- Date: 25 Jan 1996 17:25:34 -0600
- Organization: Southern Methodist University
- Sender: usenet@seas.smu.edu
- Message-ID: <4e93he$ec@sun.cis.smu.edu>
- Reply-To: dbowman@post.smu.edu
- NNTP-Posting-Host: sun.cis.smu.edu
- X-Nntp-Posting-Host: ax4-2.ppp.smu.edu
- X-Newsreader: Forte Free Agent 1.0.82
-
-
- Another beginner question:
-
- What data type is used for currency when you want "precision as
- displayed?" When using the float or double data types, you run into
- the problem of imprecision. In other words, I want to actually round
- off my numbers when necessary to create real amounts of EXACTLY 47.23,
- or whatever the case may be.
-
- One of my books suggests that there is a method of doing this with
- integers, but it does not go into any detail.
-
- Any assistance is appreciated.
-
-